#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;

const long long mod = 1e9 + 7;
ll qpow(ll a, ll b)
{
    ll ans = 1;
    while (b)
    {
        if (b % 2 == 1) ans = ans * a % mod;
        a = (a * a) % mod;
        b = b / 2;
    }
    return ans;
}

int n;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);

    int t;
    cin >> t;
    while(t--)
    {
        cin >> n;
        cout << qpow(2, n) - 1 << '\n';
    }


    return 0;
}